﻿using System;
using System.Globalization;

namespace TicketSellingServer
{
    internal class Flight
    {
        public string From { get; set; }
        public string To{ get; set; }
        public DateTime Date { get; set; }
        public string FlightId { get; set; }
        public int AvailableSeats { get; set; }
        public int Price { get; set; }

        public static DateTime DateFromString(string s)
        {
            return DateTime.ParseExact(s, "dd/MM/yyyy", CultureInfo.CurrentCulture);
        }
    }
}
